package com.szrt.day20170505.ch02;


import org.junit.Test;

public class StackTest {

	
	@Test
	public void testName() throws Exception {
		
		
		
		Node head  = new Node();
		
		
		Stack stack  = new Stack();
		stack.setHead(head);
				
				
		Node n1 = new Node(10);
		Node n2 = new Node(20);
		Node n3 = new Node(30);
		
		
		stack.push(n1);
		stack.push(n2);
		stack.push(n3);
		
		
		Node jieguo = stack.pop();
		jieguo = stack.pop();
		jieguo = stack.pop();
		jieguo = stack.pop();
		
		System.out.println(jieguo!=null?jieguo.getData():"");
		
	}
}
